package com.atguigu.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * 测试@ControllerAdvice注解
 */

@Controller
public class ExceptionController2 {
    /**
     * 测试地址：http://localhost:8080/springmvc_exception/testControllerAdvice
     * @return
     * 用来测试@ControllerAdvice，
     */
    @RequestMapping("/testControllerAdvice")
    public String testControllerAdvice() {
        System.out.println(1/0);
        return "success";
    }
}
